﻿Imports Microsoft.VisualBasic
Public Class UserSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public ID As New TableField("ID", Data.SqlDbType.Int)
    Public UserName As New TableField("UserName", Data.SqlDbType.NVarChar)
    Public emp_Num As New TableField("emp_Num", Data.SqlDbType.NVarChar)
    Public Password As New TableField("Password", Data.SqlDbType.NVarChar)
    'Public Admin As New TableField("Admin", Data.SqlDbType.Bit)
    Public FName As New TableField("FName", Data.SqlDbType.NVarChar)
    Public LName As New TableField("LName", Data.SqlDbType.NVarChar)

    Sub New()
        MyBase.StoredProcedureName = "UserSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal ID As String = "", _
                                 Optional ByVal UserName As String = "", _
                                 Optional ByVal emp_Num As String = "", _
                                 Optional ByVal Password As String = "", _
                                 Optional ByVal FName As String = "", _
                                 Optional ByVal LName As String = "") As Object
        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.ID.SetValue(ID, MyBase.FieldsArrayList)
        Me.UserName.SetValue(UserName, MyBase.FieldsArrayList)
        Me.emp_Num.SetValue(emp_Num, MyBase.FieldsArrayList)
        Me.Password.SetValue(Password, MyBase.FieldsArrayList)
        'Me.Admin.SetValue(Admin, MyBase.FieldsArrayList)
        Me.FName.SetValue(FName, MyBase.FieldsArrayList)
        Me.LName.SetValue(LName, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function


End Class
